package com.lili.collection.core.fields.support;

import com.lili.collection.core.context.Context;

import java.io.IOException;
import java.util.Set;

public abstract class FileRef {
    private final int bufferSize;

    public FileRef(int bufferSize) {
        this.bufferSize = bufferSize;
    }

    public abstract <T extends AutoCloseable> Set<Class<T>> getSupportedStreamClasses();

    public abstract <T extends AutoCloseable> T createInputStream(
            Context context,
            Class<T> streamClassType
    ) throws IOException;

    public int getBufferSize() {
        return this.bufferSize;
    }
}
